/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.webaccess.retailws.Delegate;

import com.webaccess.retailws.Bean.CategoryBean;
import com.webaccess.retailws.DAO.CategoryDAO;
import java.util.LinkedHashMap;

/**
 *
 * @author Owner
 */
public class CategoryDelegate {

    CategoryDAO categDAO = null;

    public CategoryDelegate() {
        categDAO = new CategoryDAO();
    }

    public LinkedHashMap getCategoryLHMap(int i) {
        return categDAO.getCategoryLHMap(i);
    }

    public CategoryBean getParentCategoryList() {
        return categDAO.getParentCategoryList();
    }

    public CategoryBean getSubCategoryList(Long categoryId) {
        return categDAO.getSubCategoryList(categoryId);
    }

    public CategoryBean[] getAllCategory() {
        return categDAO.getAllCategory();
    }

    public LinkedHashMap getParentCategoryLHMap(int i) {
        return categDAO.getCategoryLHMap(i);
    }

    public LinkedHashMap getSubCategoryLHMap() {
        return categDAO.getSubCategoryLHMap();
    }

    public CategoryBean getCategory(Long categoryId) {
        return categDAO.getCategory(categoryId);
    }

    public boolean saveCategory(CategoryBean categBean) {
        return categDAO.saveCategory(categBean);
    }

    public boolean deleteCategory(Long categoryId) {
        return categDAO.deleteCategory(categoryId);
    }

    public CategoryBean[] searchCategory(Long parentCategoryId) {
        return categDAO.searchCategory(parentCategoryId);
    }

    public CategoryBean[] getMainCategoryList() {
        return categDAO.getMainCategoryList();
    }

    public CategoryBean[] getSubCategories(Long categoryId) {
        return categDAO.getSubCategories(categoryId);
    }


}
